// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

/// A dyn-compatible, crate-private version of [super::Grafeas].
#[async_trait::async_trait]
pub trait Grafeas: std::fmt::Debug + Send + Sync {
    async fn get_occurrence(
        &self,
        req: crate::model::GetOccurrenceRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Occurrence>>;

    async fn list_occurrences(
        &self,
        req: crate::model::ListOccurrencesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListOccurrencesResponse>>;

    async fn delete_occurrence(
        &self,
        req: crate::model::DeleteOccurrenceRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn create_occurrence(
        &self,
        req: crate::model::CreateOccurrenceRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Occurrence>>;

    async fn batch_create_occurrences(
        &self,
        req: crate::model::BatchCreateOccurrencesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::BatchCreateOccurrencesResponse>>;

    async fn update_occurrence(
        &self,
        req: crate::model::UpdateOccurrenceRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Occurrence>>;

    async fn get_occurrence_note(
        &self,
        req: crate::model::GetOccurrenceNoteRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Note>>;

    async fn get_note(
        &self,
        req: crate::model::GetNoteRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Note>>;

    async fn list_notes(
        &self,
        req: crate::model::ListNotesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListNotesResponse>>;

    async fn delete_note(
        &self,
        req: crate::model::DeleteNoteRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn create_note(
        &self,
        req: crate::model::CreateNoteRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Note>>;

    async fn batch_create_notes(
        &self,
        req: crate::model::BatchCreateNotesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::BatchCreateNotesResponse>>;

    async fn update_note(
        &self,
        req: crate::model::UpdateNoteRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Note>>;

    async fn list_note_occurrences(
        &self,
        req: crate::model::ListNoteOccurrencesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListNoteOccurrencesResponse>>;
}

/// All implementations of [super::Grafeas] also implement [Grafeas].
#[async_trait::async_trait]
impl<T: super::Grafeas> Grafeas for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn get_occurrence(
        &self,
        req: crate::model::GetOccurrenceRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Occurrence>> {
        T::get_occurrence(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_occurrences(
        &self,
        req: crate::model::ListOccurrencesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListOccurrencesResponse>> {
        T::list_occurrences(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_occurrence(
        &self,
        req: crate::model::DeleteOccurrenceRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_occurrence(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_occurrence(
        &self,
        req: crate::model::CreateOccurrenceRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Occurrence>> {
        T::create_occurrence(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn batch_create_occurrences(
        &self,
        req: crate::model::BatchCreateOccurrencesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::BatchCreateOccurrencesResponse>> {
        T::batch_create_occurrences(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_occurrence(
        &self,
        req: crate::model::UpdateOccurrenceRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Occurrence>> {
        T::update_occurrence(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_occurrence_note(
        &self,
        req: crate::model::GetOccurrenceNoteRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Note>> {
        T::get_occurrence_note(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_note(
        &self,
        req: crate::model::GetNoteRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Note>> {
        T::get_note(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_notes(
        &self,
        req: crate::model::ListNotesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListNotesResponse>> {
        T::list_notes(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_note(
        &self,
        req: crate::model::DeleteNoteRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_note(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_note(
        &self,
        req: crate::model::CreateNoteRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Note>> {
        T::create_note(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn batch_create_notes(
        &self,
        req: crate::model::BatchCreateNotesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::BatchCreateNotesResponse>> {
        T::batch_create_notes(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_note(
        &self,
        req: crate::model::UpdateNoteRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Note>> {
        T::update_note(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_note_occurrences(
        &self,
        req: crate::model::ListNoteOccurrencesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListNoteOccurrencesResponse>> {
        T::list_note_occurrences(self, req, options).await
    }
}
